package com.ruoyi.api.controller.common;

import org.junit.Test;
import org.springframework.util.StopWatch;

/**
 * @author luobo
 * @title: TTTT
 * @projectName pos
 * @description: TODO
 * @date 2021/11/1 000114:00
 */
public class TestLocal {
    @Test
    public void test(){
        System.out.println("-----------");
    }

    public static void main(String[] args) {
        for ( int i = 2; i <= 1000000000; i++) {
            int sum = 0;//定义一个变量用于计算累加的因子之和，每次外层循环初始化
            for (int j = 1; j < i/2+1; j++) {
                if (i % j == 0) {
                    sum += j;
                }
            }
            //判断
            if (sum == i) {
                System.out.println(" "+sum);
            }
        }


        /*StopWatch sw = new StopWatch();
        sw.start();
        sw.stop();*/
    }
}
